package com.konne.nightmare.FastPublicOpinion.ui.dialog;

import android.app.Dialog;
import android.content.Context;
import android.os.Bundle;
import android.view.View;
import android.widget.TextView;

import androidx.annotation.NonNull;

import com.konne.nightmare.FastPublicOpinion.R;


/**
 * Create by ws.
 * on Data:2022/2/17  Time:下午 3:13.
 * description: ** .
 */
public class SingleAlertDialog extends Dialog {
    private CharSequence msg;
    public SingleAlertDialog(@NonNull Context context) {
        super(context, R.style.loading_dialog);
    }

    public SingleAlertDialog setMsg(CharSequence msg) {
        this.msg = msg;
        return this;
    }

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.dialog_single_alert);
        TextView tv_msg=findViewById(R.id.tv_msg);
        tv_msg.setText(msg);
        findViewById(R.id.stv_submit).setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                dismiss();
            }
        });
    }
}
